<template>
  <div class="navbar">
    <div class="left-btn" @click="$emit('back')">
      <van-icon name="arrow-left" />
    </div>
    <div class="right-btn-group">
      <div class="icon res-list-icon" @click="$emit('res-list')"></div>
      <div class="icon scan-icon" @click="$emit('scan')"></div>
      <div class="icon switch-icon" @click="$emit('switch')"></div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Navbar',
  components: {},
  mixins: [],
  props: {},
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {
  },
  mounted() {
  },
  methods: {}
}
</script>

<style scoped lang="less">
.navbar {
  width: 100%;
  position: fixed;
  background-color: #fff;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  display: flex;
  z-index: 98;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  .left-btn {
    height: 30px;
    width: 30px;
    color: #797979;
    margin-left: 8px;
    font-size: 26px;
  }
  .right-btn-group {
    display: flex;
    .icon {
      height: 30px;
      width: 30px;
      margin-right: 10px;
      &.res-list-icon {
        background: url("../../assets/icons/res.png") no-repeat center;
        background-size: cover;
      }
      &.scan-icon {
        background: url("../../assets/icons/scan.png") no-repeat center;
        background-size: cover;
      }
      &.switch-icon {
        background: url("../../assets/icons/switch.png") no-repeat center;
        background-size: cover;
      }
    }
  }
}
</style>
